using System;
using System.Collections.Generic;
using System.Text;
using GameFramework;
using GameEngine;

namespace Projet_X0
{
    public class Position : State
    {
        private Vector2D pos = null;
        private Vector2D oldPos = null;
        
        public Position(Vector2D position)
            : base((int)StatesID.Position)
        {
            pos = position;
            oldPos = new Vector2D(position.GetX(),position.GetY());
        }

        public void Set(Vector2D position)
        {
            oldPos.Set(pos.GetX(), pos.GetY());
            pos.Set(position.GetX(), position.GetY());
        }

        public Vector2D GetPos()
        {
            return pos;
        }

        public Vector2D GetOldPos()
        {
            return oldPos;
        }

        public void ResetOldPos()
        {
            pos.Set(oldPos.GetX(), oldPos.GetY());
        }

        public override void Terminate()
        {
            
        }
    }
}
